package cn.leyaber.hrm.clients;



import cn.leyaber.hrm.domain.Address;
import cn.leyaber.hrm.domain.Wholename;
import cn.leyaber.hrm.fallback.UserFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

//系统管理的Feign接口
@Service
@FeignClient(value = "USER-SERVER",fallbackFactory = UserFeignClientFallbackFactory.class )
public interface UserFeignClient{
    //查询
    @RequestMapping(value = "/wholename/{id}",method = RequestMethod.GET)
    Wholename selectById(@PathVariable("id")Long id);
    @RequestMapping(value = "/address/{id}",method = RequestMethod.GET)
    Address get(@PathVariable("id")Long id);
}
